package thread;

/**
 * @Author Justin Parker
 * @Date 2024/7/19 0019 17:41
 * @Version 1.0
 */
public class ThreadDemo03 {
    static String content ;
    public static void main(String[] args) throws InterruptedException {

        Thread t = new Thread(()->{
            content="abcd";
        });
        t.start();
        //Thread.sleep(1000);
        //while(content ==null);
        while (content == null)Thread.yield();
        System.out.println(content.toUpperCase());
    }
}
